package com.example.myapplication01.base;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.myapplication01.mvp.presenter.MainPresenter;
import com.example.myapplication01.mvp.view.MainView;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;


/**
 * @user xunua
 * @email  xunua@outlook.com
 * @creat time 2020/4/10 16:00
 */

public abstract class BaseActivity<P extends BasePresenter> extends AppCompatActivity{
    public P mPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayout());
        initView();
        initData();
    }

    public abstract int getLayout();
    public abstract void initView();//绑定组件
    public abstract void initData();//初始化数据
}
